67 questions
0
votes
0
answers
69
views
Laravel page loading issue
I got a loading problem with all my pages in my Laravel app, they all need over 2400 ms to load, the thing is they worked fine and I really don't know where I messed up
I ran a login page for the this ...
0
votes
0
answers
166
views
Job being executed twice using Rails, Active Job, Sidekiq, Clockwork, Heroku
Using the stack outlined, my jobs are running twice and I can't figure out why. Everything seems to work as planned when testing locally. I'm using a separate process to run bundle exec clockwork ...
1
vote
1
answer
2k
views
tryin to install laravel clockwork but i have an error which is Install of itsgoingd/clockwork failed
In laravel 8 I am trying to install laravel clockwork where i have php version 8.0.3 When I run
composer require itsgoingd/clockwork
command i got this error
Installing itsgoingd/clockwork (v5.0.8):...
1
vote
0
answers
812
views
Clockwork for Laravel not working when ran through docker
I have previously used clockwork browser extension for debugging laravel queries. I have never had any issues getting the extension to work as expected. Recently I started using Laravel in a docker ...
2
votes
1
answer
401
views
Rails Clockwork events getting called twice locally
When I run my clockwork file, events are registered twice. Am I doing something wrong?
CLI I'm running locally to test:
clockwork app/lib/clockwork/clock.rb
clock.rb:
require 'clockwork'
require '...
0
votes
1
answer
200
views
Scheduler works once
The project uses the task scheduler - gem 'clockwork'. Capistrano executes the hook:
after :'deploy:finished', :'clockwork:restart'
The scheduler is triggered once (after this hook), runs all rake ...
0
votes
0
answers
155
views
Ruby clockwork for one-time jobs?
I was thinking about using sneakers as my ActiveJob backend. Unfortunately it does not support delayed messages.
But since we're going to use clockwork anyway: is there any mechanism to schedule one-...
2
votes
1
answer
973
views
How to run Clockwork in Heroku
I'm really new to Heroku, but I have a problem. I have created a Clockwork script called "clock.rb" in rails and I use:
bundle exec clockwork clock.rb
to run it in the background on my local server, ...
5
votes
0
answers
678
views
log rotation inter-process lock failed opswork clockwork
I am using opswork with t2.medium machine with ruby clockwork running in it.
every 30 seconds we are triggering a job.
SPAWNED BG JOB FOR TASK: 20 for SC: 20 with Sidekiq id: ...
0
votes
1
answer
460
views
How to initialize rails 5.1 environment from ruby script for clockwork
I need to initialise rails from an arbitrary script so that I can access some ActiveRecord objects using Clockwork
UPDATE: The issue only occurs when require 'clockwork' and require_relative './...
0
votes
1
answer
192
views
access all events from clockwork manager to controller
Am using gem clockwork for running scheduled jobs.
I need to access all events defined in clock.rb for manually trigger the clockwork events when it fails.
For that I forked the clockwork gem by ...
1
vote
0
answers
184
views
Clockwork task not running each full hour
I'm using Clockwork version 0.7.0 (yes, I know it's out of date), and I set a job to run each hour:
every(1.hour, 'My job', :at => '**:00')
But the job is running only once in few hours:
2017-...
0
votes
0
answers
345
views
Clockwork won't run a job in the closest full hour
I'm using clockwork for running a job every full hour (**:00), like this:
every(1.hour, 'auto lock', :at => '**:00')
But if a add an item for the job, for example at 17:50, the job will run for ...
0
votes
1
answer
322
views
Clock work restart a job after a few minutes in rails
I am using Clock worker gem for back ground process
I have a Configuration table which contains key and value.
My clock.rb file
require 'clockwork'
require './config/boot'
require './config/...
0
votes
2
answers
243
views
Send errors from rails clockwork gem to airbrake?
What is the best way to send errors from clockwork to Airbrake?
0
votes
1
answer
843
views
superclass mismatch for class Event (TypeError)
I have an event model in my rails app:
class Event < ApplicationRecord
...
end
I am running a clockwork process on clock dyno which has
require_relative 'boot'
...
0
votes
1
answer
98
views
Clockwork with a multi-tenant setup
My app uses postgres schemas to implement multi-tenancy. So for a table like users, each tenant actually has it's own users table -
public.users (default)
foo.users
bar.users
...
As a side note, it ...
0
votes
2
answers
2k
views
How to run clockwork script in production
I am using clockwork gem. I want to automatically delete all comments from comments table every day at midnight.
This app/clock.rb script is working as it supposed to in development env.:
require './...
5
votes
4
answers
5k
views
How to assure the same job doesn't run twice at the same time?
I have a simple sidekiq job that I've set to run every 5 minutes using clockwork. What I'm worried about is that, if the job takes longer than 5 minutes, it will run again, which could cause some ...
3
votes
2
answers
1k
views
If I schedule a worker to run every day on Heroku, how can I be sure it doesn't run twice or get skipped?
I'm a bit confused as to how Clockwork, Sidekiq, and Redis all fit together on Heroku given that Heroku restarts dynos at least once a day.
Say I have a worker that runs once a day, so it's ...
1
vote
1
answer
2k
views
Rails find_each is not working
Currently, I'm triggering a SuckerPunch Job via clockwork in my Rails app.
User.find_each do |user|
puts "Found user: #{user.name}!"
end
# Doesn't work, too.
User.all.each do |user|
puts "...
4
votes
1
answer
1k
views
How to trigger Clockwork task at the beginning of the month?
I would like to run task every beginning of the month. E.g.:
2017-01-01 00:00:00 // January has just started
2017-02-01 00:00:00 // February has just started ...
...
How to do this using clockwork?
2
votes
1
answer
551
views
100% reliable clock process on Heroku?
I'm using Rails 5 on Heroku for a very lean payment processing app that will be doing large volumes of processing.
The app doesn't have much functionality, which is why it's being hosted there. ...
0
votes
1
answer
1k
views
Run job every 10 minutes with Clockwork
I would like a job to run every 10 minutes in Clockwork, but I want it to run 6 times an hour, at 00, 10, 20, 30, 40, and 50 minutes past.
In the Clockwork readme it says you can use wildcards for ...
3
votes
1
answer
800
views
Scheduling with Clockwork/Delayed_Job/ActiveJob to run every 5 minutes (round)
I am reading some sensor values and I want to schedule recurring jobs in order to repeat every :00, :10, :15, :20, :25, :30, :35 etc.
I am using clockwork/delayed_job/activeJob & foreman in ...
1
vote
1
answer
944
views
How can I run a Clockwork job manually?
Title says it all really.
Is it possible to run Clockwork jobs manually? E.g. if I have a clock.rb file
module Clockwork
every(15.minutes, 'api.sync_shifts') do
Shift.sync
end
on(:...
4
votes
0
answers
2k
views
How to find bottleneck in Laravel?
I have a large application written using Laravel 5.2. The application seems to be running good for a while "day or two" and then it starts slowing down "each request table 15+ seconds."
I am trying ...
0
votes
1
answer
28
views
I18n together with clockwork
When a model method "model_method" is called from clockwork, I18n.locale always equals to my default locale.
How do I pass the current locale to the model method?
Part of clockwork.rb:
every(10....
3
votes
0
answers
342
views
Clockwork gem "at:" time not triggering events
My clockwork script.rb looks like:
module Clockwork
configure do |config|
config[:sleep_timeout] = 1
config[:tz] = 'EST'
config[:max_threads] = 15
config[:thread] = true
end
...
0
votes
1
answer
485
views
Clockwork gem is trying to access development db in production
I am trying to start the clockwork with following command sudo bundle exec clockwork config/clock.rb in production. But it throws the following error
ActiveRecord::AdapterNotSpecified: 'development' ...
1
vote
1
answer
183
views
Sidekiq sporadically is getting nil for active records queries
My project consists of a machine that has clockwork, that creates new models in the DB.
I also have in the model after_create creating a sidekiq task using perform_async.
My problem is this:
...
0
votes
1
answer
536
views
Run clockwork only on one production instance (rails capistrano)
I have a production server with two instances app1 and app2 to which I use capistrano to deploy my application, ie: cap app1 deploy, cap app2 deploy.
I am now configuring the clockwork to schedule my ...
1
vote
2
answers
422
views
Date.today not corresponding to the actual date
I noticed a very strange issue in my logs with regards to the current time when using Date.today method. Basically, I have a cron job (using clockwork) that runs every night at 00:00, to check which ...
-1
votes
1
answer
409
views
Dynamically generating a clock file (or any file) during Rails deployment on Heroku
I use the Clockwork gem to schedule jobs on my Rails app deployed with Heroku.
For the unfamiliar, it basically reads from a clock.rb file in your app root..
# config.rb
# Schedule every Monday @ ...
7
votes
1
answer
1k
views
Rails clockwork not running code
I'm using the gem 'clockwork' in a Rails 3.2 app. The app is running on Heroku. The clock job runs at 1am - but it's not executing the code.
Here is the clock.rb code:
Clockwork.every(1.day, '...
3
votes
2
answers
3k
views
Laravel disable provider (Clockwork) on fly
I'm having a laravel setup with the Clockwork installed.
And I have a artisan command that takes really long time to run, so that clockwork will consume too much memory.
I still need that extension.
...
2
votes
2
answers
1k
views
RailsAdmin Could not load model while using Clockwork and CKEditor
I'm currently getting 2 errors. The one in the logs includes:
[RailsAdmin] Could not load model Clock, assuming model is non existing.
The other is when I run the tests to access rails_admin:
...
1
vote
1
answer
171
views
RSS - Feedjira updates, clock work gem in rails
I am new to rails so I watched railscast #168 to get an understand of how feedjira works. I got an idea how it works now. I got the functionalities to work as well. Where I struggle is at the update ...
1
vote
1
answer
1k
views
clockwork gem not running the job when :at => "some time" is given
I am trying to setup clockwork for a recurring job. (Rails 4.2) The following code from the gem read-me in app/clock.rb works and every 30 seconds the background task is fired and email is sent.
...
3
votes
0
answers
316
views
Clockwork not logging to Heroku console
I am using the Clockwork gem to run a series of rake tasks. All looks good, but it seems the puts commands dont appear in the logs, and was just wondering if anyone had any idea why?
require File....
1
vote
1
answer
783
views
Separate clock process from sidekiq workers on Docker
I am currently working on moving my environment off Heroku and part of my application is runs a clock process that sets off a Sidekiq background job.
As I understand it, Sidekiq is composed of a ...
6
votes
1
answer
301
views
Does Clockwork require its own process?
I've seen people say in a couple of different places that clockwork should be run on its own dyno, with a procfile that might look something like this (example from heroku):
clock: bundle exec ...
0
votes
1
answer
531
views
Sidekiq with Clockwork triggers but doesn't process job on heroku
Running: sidekiq 2.1.17, rails 3.2.21
I'm trying to use clockwork to schedule some recurring tasks to be done by sidekiq workers. Running foreman in development, everything runs perfectly as ...
5
votes
2
answers
1k
views
Clockwork to queue ActiveJob background jobs
Running Rails 4.2.0 so I am using the ActiveJob w/ Sidekiq backend. I need to invoke regularly scheduled background jobs so I am hoping to use Clockwork, but I haven't seen any examples of how to use ...
1
vote
1
answer
453
views
NameError using Rails, Sidekiq & Clockwork
Looking at the 'Example clock.rb file' here in the documentation, you can see that my code follows the clockwork conventions (?) exactly. However, I'm getting this error that I can't seem to fix. I've ...
1
vote
0
answers
467
views
Clockwork with Resque queueing duplicate jobs
I'm using database events and resque to queue specific tasks, but it looks like it's enqueueing the job multiple times:
16:27:00 scheduler.1 | I, [2014-09-21T16:27:00.916001 #21736] INFO -- : ...
3
votes
1
answer
1k
views
Schedule clockwork to run only on a specific date of the year
I been trying schedule a job with clockwork to run only on day eg. February 14. But I'm not sure if is this possible because the documentation formats do not have this possibility.
I know that I can ...
13
votes
2
answers
1k
views
Heroku clock process: how to ensure jobs weren't skipped?
I'm building a Heroku app that relies on scheduled jobs. We were previously using Heroku Scheduler but clock processes seem more flexible and robust. So now we're using a clock process to enqueue ...
0
votes
1
answer
698
views
Clockwork and Resque
I am trying to run a simple task to test out using resque and clockwork together.
My worker:
app/workers/logger_helper.rb
class LoggerHelper
@queue = :log_queue
def self.before_perform
...
2
votes
2
answers
3k
views
Scheduled Jobs and Custom Clock Processes with Clockwork
I am trying to understand how to execute custom code with clockwork. This is the example lib/clock.rb file that Heroku uses in its devcenter document.
require File.expand_path('../../config/boot', ...