Skip to content

Commit 72190ce

Browse files
chore(gae): remove region tags from 'taskqueue' folder (#13085)
* chore(gae): add support for Python 3 to requirements-test.txt * chore(gae): remove region tags from migration/taskqueue/pull-counter/main.py * chore(gae): add requirements-test.txt and requirements-test.txt * chore(gae): remove region tags from taskqueue/counter/worker.py * chore(gae): add requirements-test.txt and requirements-test.txt * chore(gae): remove region tags from taskqueue/pull-counter/main.py
1 parent d5d008a commit 72190ce

File tree

8 files changed

+18
-13
lines changed

8 files changed

+18
-13
lines changed

appengine/standard/migration/taskqueue/pull-counter/main.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
# [START all]
1615
"""A simple counter with a Pub/Sub pull subscription, replacing a
1716
TaskQueue pull queue, which is not available in Python 3 App Engine
1817
runtimes.
@@ -99,9 +98,6 @@ def start_handling_tasks():
9998
return "Done" # Never reached except under test
10099

101100

102-
# [END all]
103-
104-
105101
if __name__ == "__main__":
106102
# This is used when running locally only. When deploying to Google App
107103
# Engine, a webserver process such as Gunicorn will serve the app. This
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1-
pytest==7.0.1 ; python_version >= "3.0"
21
# pin pytest to 4.6.11 for Python2.
32
pytest==4.6.11; python_version < '3.0'
3+
4+
# pytest==8.3.4 and six==1.17.0 for Python3.
5+
pytest==8.3.4; python_version >= '3.0'
6+
six==1.17.0
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# pin pytest to 4.6.11 for Python2.
2+
pytest==4.6.11; python_version < '3.0'
3+
4+
# pytest==8.3.4 and six==1.17.0 for Python3.
5+
pytest==8.3.4; python_version >= '3.0'
6+
six==1.17.0
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

appengine/standard/taskqueue/counter/worker.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
# [START all]
16-
1715
from google.appengine.ext import ndb
1816
import webapp2
1917

@@ -41,4 +39,3 @@ def update_counter():
4139

4240

4341
app = webapp2.WSGIApplication([("/update_counter", UpdateCounterHandler)], debug=True)
44-
# [END all]

appengine/standard/taskqueue/pull-counter/main.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
# [START all]
1615
"""A simple counter with App Engine pull queue."""
1716

1817
import logging
@@ -41,16 +40,13 @@ def get(self):
4140
counter_template = JINJA_ENV.get_template("counter.html")
4241
self.response.out.write(counter_template.render(template_values))
4342

44-
# [START adding_task]
4543
def post(self):
4644
key = self.request.get("key")
4745
if key:
4846
queue = taskqueue.Queue("pullq")
4947
queue.add(taskqueue.Task(payload="", method="PULL", tag=key))
5048
self.redirect("/")
5149

52-
# [END adding_task]
53-
5450

5551
@ndb.transactional
5652
def update_counter(key, tasks):
@@ -91,4 +87,3 @@ def get(self):
9187
app = webapp2.WSGIApplication(
9288
[("/", CounterHandler), ("/_ah/start", CounterWorker)], debug=True
9389
)
94-
# [END all]
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# pin pytest to 4.6.11 for Python2.
2+
pytest==4.6.11; python_version < '3.0'
3+
4+
# pytest==8.3.4 and six==1.17.0 for Python3.
5+
pytest==8.3.4; python_version >= '3.0'
6+
six==1.17.0
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

0 commit comments

Comments
 (0)