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

variety bug fix #142

Merged
merged 8 commits into from
Aug 20, 2021
Merged

variety bug fix #142

merged 8 commits into from
Aug 20, 2021

Conversation

PaleNeutron
Copy link
Contributor

Proposed Changes

Dockerfile Outdated

RUN pip install scylla
RUN pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/ && python setup.py install
Copy link
Owner

Choose a reason for hiding this comment

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

We don't need this because GH Actions are running overseas.

I will find a way to fix the CI.

Copy link
Owner

Choose a reason for hiding this comment

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

The CI has been fixed.


FROM python:3.9-slim
FROM python:3.9-slim as prod
Copy link
Owner

Choose a reason for hiding this comment

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

Why as prod is needed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added a docker-compose file which is under testing, prod is used for specific target in docker-compose file's build

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oops, changes for testing are sending by pr 😭

Copy link
Contributor Author

Choose a reason for hiding this comment

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

please just review b299692 😭😭😭😭

Copy link
Owner

Choose a reason for hiding this comment

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

Can you remove this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, of course, give one night and I'll merge them into another pr.

Copy link
Owner

Choose a reason for hiding this comment

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

Sure! Let me know if your PR is ready. You could also mark this one as a draft PR if needed.


FROM python:3.9-slim
FROM python:3.9-slim as prod
Copy link
Owner

Choose a reason for hiding this comment

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

Can you remove this change?

@@ -111,6 +111,7 @@ def feed_from_db():
class Scheduler(object):

def __init__(self):
self.manager = Manager()
Copy link
Owner

Choose a reason for hiding this comment

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

Could you explain what's the purpose of this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

A legacy change. When I face UnpickleableError: Cannot pickle <type 'thread.lock'> objects, I thought it is due to multiprocessing.Queue object can not be picked.

But I finally found the problem is caused by initialize provider in the main process.

It could be removed.

Copy link
Owner

Choose a reason for hiding this comment

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

Thanks for the explanation!

@@ -111,6 +111,7 @@ def feed_from_db():
class Scheduler(object):

def __init__(self):
self.manager = Manager()
Copy link
Owner

Choose a reason for hiding this comment

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

Thanks for the explanation!


FROM python:3.9-slim
FROM python:3.9-slim as prod
Copy link
Owner

Choose a reason for hiding this comment

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

Sure! Let me know if your PR is ready. You could also mark this one as a draft PR if needed.

@PaleNeutron
Copy link
Contributor Author

Hi, commits are neat now.

*.egg
MANIFEST

# PyInstaller
Copy link
Owner

Choose a reason for hiding this comment

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

We're not using PyInstaller. Could you remove it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since .dockerignore is just a copy of .gitignore I do not review it🤣

So, maybe we could remove it from both files?

Copy link
Owner

Choose a reason for hiding this comment

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

Not a blocker for this PR. We can clean it up later.

.dockerignore Show resolved Hide resolved
Dockerfile Show resolved Hide resolved
Dockerfile Outdated

FROM python:3.9-slim as build
Copy link
Owner

Choose a reason for hiding this comment

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

maybe python-build for clarity?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea

Dockerfile Outdated Show resolved Hide resolved
@@ -35,14 +35,14 @@ def parse(self, document: PyQuery) -> [ProxyIP]:
def urls(self) -> [str]:
ret = []
first_url = 'http://proxy-list.org/english/index.php?p=1'
sub = first_url[0:first_url.rfind('/')] # http://proxy-list.org/english
# sub = first_url[0:first_url.rfind('/')] # http://proxy-list.org/english
Copy link
Owner

Choose a reason for hiding this comment

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

Since of commenting out of this line, could we just remove it since we have history?

Copy link
Owner

@imWildCat imWildCat left a comment

Choose a reason for hiding this comment

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

Thanks for the effort!

I really appreciate it!

@imWildCat
Copy link
Owner

@PaleNeutron I'm merging this one.

@imWildCat imWildCat merged commit 81e0dee into imWildCat:main Aug 20, 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.

2 participants