小编JAl*_*rto的帖子

我怎样才能在Absinthe中使用时间戳?(凤凰1.3)

我有凤凰1.3 +苦艾酒的问题.

我试试这段代码:

schema "urls" do
  field :path, :string

  timestamps()
 end

object :url do
  field :id, :id
  field :path, :string
  field :inserted_at, :datetime
end
Run Code Online (Sandbox Code Playgroud)

它可以使用id,path但它失败inserted_at了:

Inserted_at :datetime is not defined in your schema.          

Types must exist if referenced.   


lib/absinthe/schema.ex:230: Absinthe.Schema.__after_compile__/2     
(stdlib) erl_eval.erl:670: :erl_eval.do_apply/6                     
(elixir) lib/kernel/parallel_compiler.ex:121: anonymous fn/4 in Kernel.ParallelCompiler.spawn_compilers/1
Run Code Online (Sandbox Code Playgroud)

elixir phoenix-framework absinthe

15
推荐指数
1
解决办法
1474
查看次数

具有默认类PV的Pod需要30分钟来升级,以等待磁盘连接

我部署了一个带1个吊舱和2个容器的头盔图(statefulSet),其中一个容器附加有PV(readwriteonce)。升级时,需要30分钟(7次尝试失败)才能再次启动(因此该服务关闭了30分钟)

一些背景:

  • PV使用默认的GKE类
  • 是GKE区域,每个区域中只有一个节点
  • 即使未强制执行,该广告连播也会在同一节点中再次闪烁(因此,我看不到节点传输)
  • 我在天蓝色的AKS中有一个类似的问题,它也失败了7次,但速度更快,因此停机时间极少,并且涉及节点转移

yaml文件的相关部分:

volumeMounts:
  - mountPath: /app/data
    name: prod-data
Run Code Online (Sandbox Code Playgroud)
  volumeClaimTemplates:
  - metadata:
      creationTimestamp: null
      name: prod-data
    spec:
      accessModes:
      - ReadWriteOnce
      resources:
        requests:
          storage: 500Gi
      storageClassName: standard
      volumeMode: Filesystem
Run Code Online (Sandbox Code Playgroud)

错误信息:

Unable to mount volumes for pod "foo" timeout expired waiting for volumes to attach or mount for pod "foo". list of unmounted volumes=[foo] list of unattached volumes [foo default-token-foo]
Run Code Online (Sandbox Code Playgroud)

额外的上下文,这是触发StatefulSet升级后发生的情况:

什么都没改变

Name:          prod-data-prod-0
Namespace:     prod
StorageClass:  standard
Status:        Bound
Volume:        pvc-16f49d12-f644-11e9-952a-4201ac100008
Labels:        app=prod
               release=prod
Annotations:   pv.kubernetes.io/bind-completed: yes …
Run Code Online (Sandbox Code Playgroud)

google-kubernetes-engine

5
推荐指数
1
解决办法
153
查看次数