protected $description = 'Generate the songs hash';
public function handle($arguments) {
+ if (file_exists('/tmp/gnb.lock')) {
+ $this->replyWithMessage(
+ [
+ 'text' => "Rebuild currently in progress, try again after it is complete."
+ ]
+ );
+
+ return;
+ }
$this->replyWithMessage(
[
'text' => "Building songs hash list... This will take a while."
]
);
$chatid = getTelegram()->getWebhookUpdates()->get('message')->get('chat')->get('id');
+
exec('/opt/hashgen.sh notify ' . $chatid . ' > /dev/null &');
}
}