我正在使用 LoadData.send_later(:test) 调用函数。LoadData 是我的课程,测试是我的方法。
当我运行 rake 作业时它工作正常:工作。
但是当我运行 script/delayed_job 启动或运行时,delayed_job.log 显示错误,如
TEastern Daylight Time: *** Starting job worker delayed_job host:KShah pid:5968
TEastern Daylight Time: * [Worker(delayed_job host:KShah pid:5968)] acquired lock on LoadData.load_test_data_with_delayed_job
Could not load object for job: uninitialized constant LoadData
TEastern Daylight Time: * [JOB] delayed_job host:KShah pid:5968 completed after 0.0310
TEastern Daylight Time: 1 jobs processed at 10.6383 j/s, 0 failed ...
有什么解决办法??