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

Job results not saving to postgres table #21

Open
vincerogers opened this issue Dec 12, 2023 · 8 comments
Open

Job results not saving to postgres table #21

vincerogers opened this issue Dec 12, 2023 · 8 comments
Assignees

Comments

@vincerogers
Copy link

Following the readme instructions:

  1. Stand up docker container
  2. Successfully populate gmaps_jobs with go run main.go -dsn "postgres://postgres:postgres@localhost:5432/postgres" -produce -input example-queries.txt --lang el
  3. Run the process which successfully finishes: go run main.go -c 2 -depth 1 -dsn "postgres://postgres:postgres@localhost:5432/postgres"
  4. "results" table is empty upon completion
@gosom
Copy link
Owner

gosom commented Dec 12, 2023

this is a bug .

thank you very much for reporting this @vincerogers .

it is just fixed. Please try the latest main or tag v1.1.2

@gosom gosom closed this as completed Dec 12, 2023
@vincerogers
Copy link
Author

Confirmed, that was a quick turnaround! Thank you!

@vincerogers
Copy link
Author

@gosom - Is there a chance that this fix might have broken the "-emails" capability? I'm not seeing the json emails property populated in my tests, and it looks like they aren't showing up in the csv based export either.

@gosom
Copy link
Owner

gosom commented Dec 12, 2023

go run main.go -depth 1 -input example-queries.txt -lang en -results test-out.csv -exit-on-inactivity 1m -email -debug -c 1

just run the above (in debug mode) and I got emails

@gosom gosom reopened this Dec 12, 2023
@vincerogers
Copy link
Author

You are correct, that did produce emails on the output csv. However, when I run basically the same thing at postgres via:
go run main.go -depth 1 -dsn "postgres://postgres:postgres@localhost:5432/postgres" -exit-on-inactivity 1m -email -c 1

Once complete, a query against the result table returns nulls for all emails:
select data->>'title', data->>'web_site' , data->>'emails', data from results

Am I doing something wrong? Thanks for your help!

@gosom
Copy link
Owner

gosom commented Dec 12, 2023

You are correct, that did produce emails on the output csv. However, when I run basically the same thing at postgres via:

go run main.go -depth 1 -dsn "postgres://postgres:postgres@localhost:5432/postgres" -exit-on-inactivity 1m -email -c 1

Once complete, a query against the result table returns nulls for all emails:

select data->>'title', data->>'web_site' , data->>'emails', data from results

Am I doing something wrong? Thanks for your help!

I will check and let you know. It's a bit late for me now

@gosom
Copy link
Owner

gosom commented Dec 13, 2023

I confirmed that it's a bug.

I don't think it's trivial to fix and it will take some time.
I will update the issue once this is fixed.

Thanks for reporting

@gosom gosom self-assigned this Dec 13, 2023
@LL-AI-dev
Copy link

Is there any update on this? I am trying but am unable to collect emails when using this repo with a database.

Using -email flag ONLY when producing seed
This creates a lot of jobs that error and fail - due to invalid job type.
No emails are collected

Using -email flag BOTH when producing seeds and executing jobs
This creates a lot of jobs that error and fail - due to invalid job type.
No emails are collected

Using -email flag ONLY when executing jobs
All jobs run successfully.
No emails are collected

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

3 participants