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

Logs in details panel #210

Closed

Conversation

Jivings
Copy link
Contributor

@Jivings Jivings commented Dec 23, 2020

Added job logs to the details panel. Loaded async when the specific panel is opened so we're not loading loads of pointless data.

image

@Jivings Jivings changed the title added logs to details panel Logs in details panel Dec 23, 2020
@Jivings
Copy link
Contributor Author

Jivings commented Dec 23, 2020

fixes #97

@@ -25,6 +25,10 @@ export class BullAdapter implements QueueAdapter {
return this.queue.getJob(id)
}

public getLogs(id: string): Promise<string[]> {
return this.queue.getJobLogs(id).then(({logs}) => logs);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have a lint issue here. pls fix

@@ -28,6 +28,10 @@ export class BullMQAdapter implements QueueAdapter {
return this.queue.getJob(id)
}

public getLogs(id: string): Promise<string[]> {
return this.queue.getJobLogs(id).then(({logs}) => logs);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have a lint issue here. pls fix

}) => {
const [state, setState] = useState([])

useEffect(() => {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Components should not know how to make AJAX requests, it breaks the entire encapsulation.
All "actions" are under actions object (which get passed already to JobCard).

This way you don't need to pass the queue name every where.

Pls refactor this 🙏🏼

@omairvaiyani
Copy link

@Jivings need some help getting this over the line?

@Jivings
Copy link
Contributor Author

Jivings commented Jan 15, 2021

@omairvaiyani please feel free to take over! I'm in a bad position where I can dedicate the time to fix my own issues but I'm not profecient in typescript, so I can't spend the extra time getting everything perfect. So would be an awesome help if you could fix it up 🙏

Right now I have this running on a production bull instance for the last three weeks with no issues 👍

felixmosh added a commit that referenced this pull request Mar 22, 2021
closes #210
closes #97
@felixmosh felixmosh mentioned this pull request Mar 22, 2021
felixmosh added a commit that referenced this pull request Mar 22, 2021
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

Successfully merging this pull request may close these issues.

3 participants