I want to cancel the execution of a worker.
I have this job, for example:
#<Sidekiq::Cron::Job:0x007f1f66a869c0 @name="Crawler-job_data-source=10", @cron="20 */5 * * *", @klass="HardWorker", @status="enabled", @last_enqueue_time=2014-12-01 10:57:19 -0300, @args=[10], @message="{\"retry\":1,\"queue\":\"default\",\"unique\":true,\"class\":\"HardWorker\",\"args\":[10]}">
I setup the worker's execution with @cron="20 */5 * * *".
There are two posibilities:
1) The worker starts every 5 hours from 0 hours, 20 minutes
2) The worker starts immediately when i try this : HardWorker.perform_async(anId)
When i try HardWorker.perform_async(anId), it returns an id, for example "f80b29495c44a34ded9a333f" .
Is there anyway to cancel the sidekiq worker after the execution of the perform_async method?