google-app-engine

How to read email (custom) header and attachments from InboundMailHandler in Google App Engine

百般思念 提交于 2020-01-05 20:06:12
问题 How to read email header in Google App Engine. I am trying to search in google, but can't find any good and working example. 回答1: here the answer. File: app.yaml (you will send email to mymail@myapp.appspotmail.com ) application: myapp version: 1 runtime: python27 api_version: 1 threadsafe: yes handlers: - url: /_ah/mail/mymail@myapp\.appspotmail\.com script: mail.app login: admin - url: .* script: main.app libraries: - name: webapp2 version: "2.5.1" inbound_services: - mail Assuming your app

Using Objectify to concurrently write data on GAE

允我心安 提交于 2020-01-05 16:58:23
问题 Let's for example say I have the following objectify model: @Cache @Entity public class CompanyViews implements Serializable, Persistence { @Id private Long id; private Date created; private Date modified; private Long companyId; ........ private Integer counter; ........ @Override public void persist() { persist(false); } @Override public void persist(Boolean async) { ObjectifyService.register(Feedback.class); // setup some variables setUuid(UUID.randomUUID().toString().toUpperCase());

Using Objectify to concurrently write data on GAE

半腔热情 提交于 2020-01-05 16:57:31
问题 Let's for example say I have the following objectify model: @Cache @Entity public class CompanyViews implements Serializable, Persistence { @Id private Long id; private Date created; private Date modified; private Long companyId; ........ private Integer counter; ........ @Override public void persist() { persist(false); } @Override public void persist(Boolean async) { ObjectifyService.register(Feedback.class); // setup some variables setUuid(UUID.randomUUID().toString().toUpperCase());

Pipeline Submission from App Engine

霸气de小男生 提交于 2020-01-05 15:17:38
问题 I have a requirement to send Datastore Entities to a BigQuery table while at the same time doing transformation of the data. My design so far as follows: AppEngine Java application publishes data to a Topic in the PUB/SUB service - got that working. Then have a DataflowPipeline subscribe to the topic and read the message. The transform is then done and result written to BigQuery. I have some sample code running to test this. I have a crude Pipeline working from my local development machine

2d or 3d array in Google App Engine persistence?

谁都会走 提交于 2020-01-05 14:17:17
问题 Using JDO and Persistence, I'm able to successfully store an ArrayList field and retrieve it from a class later. Unfortunately, arrays like myobject[][][] are not supported, as stated in documentation. I tried ArrayList<ArrayList<myobject>> , but this gives many errors, and careful reading of the documentation would seem to suggest this may not be possible. Is it possible to persist an array of two or more dimensions? If so, what is the most correct way to do this? 回答1: If you want multiple

GAE Managed VM with automatic scaling and resources config fails with HttpError 409

三世轮回 提交于 2020-01-05 14:11:27
问题 I'm experiencing the following error intermittently while deploying a java application to appengine using managed VMs with explicit resource configuration: Deployment failed: https://www.googleapis.com/autoscaler/v1beta2/projects/managedvm409example/zones/us-central1-f/autoscalers?alt=json returned "Autoscaler resource with this name already exists in this zone or there exists an Autoscaler controlling the given target."> Deployed Version: 1.385892435190233331 Here's the configuration I'm

GAE Managed VM with automatic scaling and resources config fails with HttpError 409

孤街浪徒 提交于 2020-01-05 14:11:20
问题 I'm experiencing the following error intermittently while deploying a java application to appengine using managed VMs with explicit resource configuration: Deployment failed: https://www.googleapis.com/autoscaler/v1beta2/projects/managedvm409example/zones/us-central1-f/autoscalers?alt=json returned "Autoscaler resource with this name already exists in this zone or there exists an Autoscaler controlling the given target."> Deployed Version: 1.385892435190233331 Here's the configuration I'm

openPrefetchingReadChannel is not working in Google Cloud Storage Client API

徘徊边缘 提交于 2020-01-05 12:49:07
问题 I am trying to fetch object from bucket using openPrefetchingReadChannel GCSInputChannel . As Google developer tutorial says : GcsInputChannel readChannel = gcsService.openPrefetchingReadChannel(fileName, 0, 1024 * 1024); Prefetching provides is a major performance advantage for most applications, because it allows processing part of the file while more data is being downloaded in the background in parallel.The third parameter is the size of the prefetch buffer, set in the example to 1

Using phpExcel to download xlsx file using Google App Engine

我们两清 提交于 2020-01-05 12:16:55
问题 I'm writing a php web app to create and download an xlsx file, using Google App Engine: $objPHPExcel = new PHPExcel(); $objPHPExcel->setActiveSheet(0); $objPHPExcel->getActiveSheet()->setCellValue('A1', 4); header('Content-Type: application/vnd.ms-excel'); header('Content-Disposition: attachment;filename="01simple.xls"'); header('Cache-Control: max-age=0'); $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5'); $objWriter->save('php://output'); exit; When I run this app

Why do Datastore datetimes look different in appengine console vs appengine dashboard?

隐身守侯 提交于 2020-01-05 11:05:17
问题 I have a very simple NDB model for which I'm entering Date-of-Birth for a user: class Contact(ndb.Model): first_name= ndb.StringProperty() last_name= ndb.StringProperty() dob = ndb.DateTimeProperty() contact1_dob = datetime.strptime('12/17/1989', "%m/%d/%Y").date() contact1 = Contact(first_name='Homer', last_name='Simpson', dob=contact1_dob ) contact1_result = contact1.put() Loading into the datastore works fine, and when I look at the data via the Google Appengine dashboard https://appengine