Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Lua redis() command arguments must be strings or integers" #37

Open
nuclon opened this issue Aug 21, 2018 · 2 comments
Open

"Lua redis() command arguments must be strings or integers" #37

nuclon opened this issue Aug 21, 2018 · 2 comments

Comments

@nuclon
Copy link

nuclon commented Aug 21, 2018

When I attempt to add a job, I get an exception:

error:  { ReplyError: ERR Error running script (call to f_ad2dfd82189c92739c79fc30a2af6fd46c8a2793): @user_script:932: @user_script: 932: Lua redis() command arguments must be strings or integers
    at parseError (/app/node_modules/redis-parser/lib/parser.js:181:12)
    at parseType (/app/node_modules/redis-parser/lib/parser.js:269:14)
  command: 'EVALSHA',
  args:
   [ 'ad2dfd82189c92739c79fc30a2af6fd46c8a2793',
     0,
     'put',
     1534841192.583,
     'WORKER_ID',
     'QUEUE_NAME',
     'a73eee2c3b47d1261065556a796cc8a5',
     'workers.Job',
     'JOB_DATA',
     0,
     'priority',
     0,
     'tags',
     '[]',
     'retries',
     5,
     'depends',
     '[]' ],
  code: 'ERR' } ERR Error running script (call to f_ad2dfd82189c92739c79fc30a2af6fd46c8a2793): @user_script:932: @user_script: 932: Lua redis() command arguments must be strings or integers

I use redis 4.0.6 and the library, cloned from git.
I suppose that the problem is in float timestamp (1534841192.583).

@dlecocq
Copy link

dlecocq commented Aug 21, 2018

If you're able to reproduce this, would you be able to post a trace taken from redis-cli monitor while that happens? I imagine it's probably not the timestamp in the call to evalsha that's causing the problem.

@nuclon
Copy link
Author

nuclon commented Aug 21, 2018

Actually, it is. I added Math.floor() calls to all places where "now" date is created and now everything works well. I can make a PR, but it is just three lines change.
I will do the trace.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants